<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>wwwApp: error.php File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">wwwApp
   </div>
   <div id="projectbrief">A web app for workshop organizing, recruitment and qualification</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.1.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">error.php File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><a href="error_8php_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKnownException.html">KnownException</a></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classDbException.html">DbException</a></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPolicyException.html">PolicyException</a></td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:afbdc4b0d28a418a301f894606c50a7b9"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="error_8php.html#afbdc4b0d28a418a301f894606c50a7b9">initErrors</a> ()</td></tr>
<tr class="memitem:a256dac2dddb669dcfbe514290889ff0c"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="error_8php.html#a256dac2dddb669dcfbe514290889ff0c">errorParse</a> ($errno, $errstr='', $errfile='', $errline='', &amp;$logMessage=null)</td></tr>
<tr class="memitem:a7ee77af6e63cc29410016ba38ff8f5e7"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="error_8php.html#a7ee77af6e63cc29410016ba38ff8f5e7">errorHandler</a> ($errno, $errstr='', $errfile='', $errline='')</td></tr>
<tr class="memitem:aecac67e056c30d19f4bb48d0593c24fb"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="error_8php.html#aecac67e056c30d19f4bb48d0593c24fb">shutdownHandler</a> ()</td></tr>
<tr class="memitem:ab1a82923ae40857687d61a5be27baa78"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="error_8php.html#ab1a82923ae40857687d61a5be27baa78">getArgument</a> ($arg)</td></tr>
<tr class="memitem:a9eb4c4183b3422da2c46809ba4cd7244"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="error_8php.html#a9eb4c4183b3422da2c46809ba4cd7244">dumpSuperGlobals</a> ()</td></tr>
<tr class="memitem:a1cc8adecfb295ae30b85d90dc5ca3062"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="error_8php.html#a1cc8adecfb295ae30b85d90dc5ca3062">errorLog</a> ($logMessage)</td></tr>
<tr class="memitem:a7db90a246d4b6c35418327a8219b490c"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="error_8php.html#a7db90a246d4b6c35418327a8219b490c">actionShowErrorLog</a> ()</td></tr>
</table>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="a7db90a246d4b6c35418327a8219b490c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">actionShowErrorLog </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="error_8php_source.html#l00306">306</a> of file <a class="el" href="error_8php_source.html">error.php</a>.</p>
<div class="fragment"><div class="line">{</div>
<div class="line">        global <a class="code" href="common_8php.html#a7dc56dc8b18ad37272b56fa7395bedef">$DB</a>, $USER, <a class="code" href="index_8php.html#ae1848ae8dc4014bc7c680e5504a8eef0">$PAGE</a>;</div>
<div class="line">        <span class="keywordflow">if</span> (!<a class="code" href="user_2utils_8php.html#a1e9c8ed2c5ed2def1a367c9ffd04114b">userCan</a>(<span class="stringliteral">&#39;showLog&#39;</span>))  <span class="keywordflow">return</span>;</div>
<div class="line">        <span class="keywordflow">if</span> (!<a class="code" href="config_8php_8template.html#a5f69b1d39894d1df9f8cb3f93a7dd018">ERROR_LOG</a>)</div>
<div class="line">                $PAGE-&gt;addMessage(_(<span class="stringliteral">&#39;Error log disabled in configuration.&#39;</span>));</div>
<div class="line">        <span class="keywordflow">else</span></div>
<div class="line">        {</div>
<div class="line">                $contents = file_get_contents(<a class="code" href="config_8php_8template.html#a5f69b1d39894d1df9f8cb3f93a7dd018">ERROR_LOG</a>);</div>
<div class="line">                $PAGE-&gt;addMessage(<span class="stringliteral">&#39;&lt;pre&gt;&#39;</span>. htmlspecialchars($contents) .<span class="stringliteral">&#39;&lt;/pre&gt;&#39;</span>);</div>
<div class="line">        }</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a9eb4c4183b3422da2c46809ba4cd7244"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">dumpSuperGlobals </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="error_8php_source.html#l00258">258</a> of file <a class="el" href="error_8php_source.html">error.php</a>.</p>

<p>Referenced by <a class="el" href="page_8php_source.html#l00016">Page\finish()</a>.</p>
<div class="fragment"><div class="line">{</div>
<div class="line">        $result = <span class="stringliteral">&#39;&#39;</span>;</div>
<div class="line">        $result .= <span class="stringliteral">&#39;&lt;b&gt;GET:&lt;/b&gt;&lt;br/&gt;&#39;</span>;</div>
<div class="line">        <span class="keywordflow">foreach</span> ($_GET as $name=&gt;$value)</div>
<div class="line">                $result .= $name .<span class="stringliteral">&#39;=&gt;&#39;</span>. htmlentities($value) .<span class="stringliteral">&#39;,&lt;br/&gt;&#39;</span>;</div>
<div class="line"></div>
<div class="line">        $result .= <span class="stringliteral">&#39;&lt;b&gt;POST:&lt;/b&gt;&lt;br/&gt;&#39;</span>;</div>
<div class="line">        <span class="keywordflow">foreach</span> ($_POST as $name=&gt;$value)</div>
<div class="line">        {</div>
<div class="line">                <span class="keywordflow">if</span> (is_array($value))  $result .= $name .<span class="stringliteral">&#39;=&gt;&#39;</span>. htmlspecialchars(implode(<span class="charliteral">&#39;,&#39;</span>,$value)) .<span class="stringliteral">&#39;,&lt;br/&gt;&#39;</span>;</div>
<div class="line">                <span class="keywordflow">else</span>   $result .= $name .<span class="stringliteral">&#39;=&gt;&#39;</span>. htmlspecialchars($value) .<span class="stringliteral">&#39;,&lt;br/&gt;&#39;</span>;</div>
<div class="line">        }</div>
<div class="line"></div>
<div class="line">        $result .= <span class="stringliteral">&#39;&lt;b&gt;SESSION:&lt;/b&gt;&lt;br/&gt;&#39;</span>;</div>
<div class="line">        <span class="keywordflow">foreach</span> ($_SESSION as $name=&gt;$value)</div>
<div class="line">                $result .= $name .<span class="stringliteral">&#39;=&gt;&#39;</span>. htmlentities(json_encode($value)) .<span class="stringliteral">&#39;,&lt;br/&gt;&#39;</span>;</div>
<div class="line"></div>
<div class="line"></div>
<div class="line">        $result .= <span class="stringliteral">&#39;&lt;b&gt;SERVER:&lt;/b&gt;&lt;br/&gt;&#39;</span>;</div>
<div class="line">        $exclude = array</div>
<div class="line">        (</div>
<div class="line">                <span class="stringliteral">&#39;HTTP_ACCEPT&#39;</span>,<span class="stringliteral">&#39;HTTP_ACCEPT_CHARSET&#39;</span>,</div>
<div class="line">                <span class="stringliteral">&#39;HTTP_ACCEPT_ENCODING&#39;</span>,<span class="stringliteral">&#39;HTTP_TE&#39;</span>,<span class="stringliteral">&#39;PATH&#39;</span>,<span class="stringliteral">&#39;SERVER_SIGNATURE&#39;</span>,</div>
<div class="line">                <span class="stringliteral">&#39;SERVER_SOFTWARE&#39;</span>,<span class="stringliteral">&#39;SERVER_ADMIN&#39;</span>,<span class="stringliteral">&#39;GATEWAY_INTERFACE&#39;</span>,<span class="stringliteral">&#39;SERVER_PROTOCOL&#39;</span></div>
<div class="line">        );</div>
<div class="line">        <span class="keywordflow">foreach</span> ($_SERVER as $name=&gt;$value)  <span class="keywordflow">if</span>(!in_array($name, $exclude))</div>
<div class="line">        {</div>
<div class="line">                <span class="keywordflow">if</span> (is_array($value))  $result .= $name .<span class="stringliteral">&#39;=&gt;&#39;</span>. htmlspecialchars(implode(<span class="charliteral">&#39;,&#39;</span>,$value)) .<span class="stringliteral">&#39;,&lt;br/&gt;&#39;</span>;</div>
<div class="line">                <span class="keywordflow">else</span>   $result .= $name .<span class="stringliteral">&#39;=&gt;&#39;</span>. htmlspecialchars($value) .<span class="stringliteral">&#39;,&lt;br/&gt;&#39;</span>;</div>
<div class="line">        }</div>
<div class="line"></div>
<div class="line">        <span class="keywordflow">return</span> $result;</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a7ee77af6e63cc29410016ba38ff8f5e7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">errorHandler </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$errno</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$errstr</em> = <code>''</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$errfile</em> = <code>''</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$errline</em> = <code>''</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="error_8php_source.html#l00156">156</a> of file <a class="el" href="error_8php_source.html">error.php</a>.</p>
<div class="fragment"><div class="line">{</div>
<div class="line">        <span class="comment">// Skip errors suppresed with @.</span></div>
<div class="line">        <span class="keywordflow">if</span> (error_reporting() == 0) <span class="keywordflow">return</span>;</div>
<div class="line">        <span class="comment">// Rethrow errors as exceptions so they can be caught.</span></div>
<div class="line">        <span class="keywordflow">if</span> (!is_object($errno))</div>
<div class="line">        {</div>
<div class="line">                <span class="keywordflow">if</span> ($errno &amp; error_reporting())</div>
<div class="line">                  <span class="keywordflow">throw</span> <span class="keyword">new</span> ErrorException($errstr, $errno, $errno, $errfile, $errline);</div>
<div class="line">                <span class="keywordflow">else</span>  <span class="keywordflow">return</span>;</div>
<div class="line">        }</div>
<div class="line"></div>
<div class="line">        <span class="keywordflow">try</span></div>
<div class="line">        {</div>
<div class="line">                <span class="keywordflow">if</span> ($errno-&gt;getCode() &amp; error_reporting())</div>
<div class="line">                {</div>
<div class="line">                        $level = ob_get_level();</div>
<div class="line">                        <span class="keywordflow">for</span> ($i=0; $i&lt;$level; $i++) @ob_end_clean();</div>
<div class="line">                        <span class="keywordflow">if</span> ($errno instanceof <a class="code" href="classKnownException.html">KnownException</a>)</div>
<div class="line">                                header(<span class="stringliteral">&#39;HTTP/1.1 &#39;</span>. $errno-&gt;status);</div>
<div class="line">                        $logMessage = <span class="stringliteral">&#39;&#39;</span>;</div>
<div class="line">                        $parsed = @<a class="code" href="error_8php.html#a256dac2dddb669dcfbe514290889ff0c">errorParse</a>($errno,$errstr,$errfile,$errline,$logMessage);</div>
<div class="line">                        echo <span class="stringliteral">&#39;&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;&#39;</span>;</div>
<div class="line">                        echo <span class="stringliteral">&#39;&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; xml:lang=&quot;pl&quot; lang=&quot;pl&quot; dir=&quot;ltr&quot;&gt;&lt;head&gt;&#39;</span>;</div>
<div class="line">                        echo <span class="stringliteral">&#39;    &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;&#39;</span>;</div>
<div class="line">                        echo <span class="stringliteral">&quot;&lt;/head&gt;&lt;body&gt;$parsed&lt;/body&gt;&lt;/html&gt;&quot;</span>;</div>
<div class="line">                        <a class="code" href="error_8php.html#a1cc8adecfb295ae30b85d90dc5ca3062">errorLog</a>($logMessage);</div>
<div class="line">                        <span class="keywordflow">if</span> (<a class="code" href="config_8php_8template.html#a5c3cdee20942e4753d2dcdb4a36085ef">ERROR_EMAIL</a>)  <a class="code" href="email_8php.html#a4d9b10638d7c2d561789ed42890fba01">sendMail</a>(<span class="stringliteral">&#39;warsztatyWWW error&#39;</span>, $logMessage, <a class="code" href="config_8php_8template.html#ad44b83fd76c17d2ae868b79ce296e01d">ERROR_EMAIL_ADDRESS</a>);</div>
<div class="line">                }</div>
<div class="line">        }</div>
<div class="line">        <span class="keywordflow">catch</span> (Exception $e)</div>
<div class="line">        {</div>
<div class="line">                echo <span class="stringliteral">&#39;&lt;b&gt;Błąd w samej obsłudze błędów - pewnie nie udaje się wysłać raportu. Napisz proszę do &#39;</span>. <a class="code" href="config_8php_8template.html#a161dd3855c85d166da6a623576b28b83">BUGREPORT_EMAIL_ADDRESS</a> .<span class="stringliteral">&#39;&lt;/b&gt;&lt;br/&gt;&#39;</span>;</div>
<div class="line">                echo <span class="stringliteral">&#39;Error within handler: &lt;pre&gt;&#39;</span>.$e-&gt;getMessage().<span class="stringliteral">&#39;&lt;/pre&gt; on line &#39;</span>.$e-&gt;getLine();</div>
<div class="line"></div>
<div class="line">        }</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a1cc8adecfb295ae30b85d90dc5ca3062"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">errorLog </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$logMessage</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="error_8php_source.html#l00293">293</a> of file <a class="el" href="error_8php_source.html">error.php</a>.</p>

<p>Referenced by <a class="el" href="utils_8php_source.html#l00285">actionReportBugForm()</a>, <a class="el" href="error_8php_source.html#l00156">errorHandler()</a>, <a class="el" href="email_8php_source.html#l00038">sendMail()</a>, and <a class="el" href="error_8php_source.html#l00194">shutdownHandler()</a>.</p>
<div class="fragment"><div class="line">{</div>
<div class="line">        touch(<a class="code" href="config_8php_8template.html#a5f69b1d39894d1df9f8cb3f93a7dd018">ERROR_LOG</a>);</div>
<div class="line">        $lines = file(<a class="code" href="config_8php_8template.html#a5f69b1d39894d1df9f8cb3f93a7dd018">ERROR_LOG</a>);</div>
<div class="line">        <span class="keywordflow">if</span> (is_array($lines))</div>
<div class="line">                $lines = array_slice($lines, -8000);</div>
<div class="line">        <span class="keywordflow">else</span></div>
<div class="line">                $lines = array();</div>
<div class="line">        $lines[]= <span class="stringliteral">&quot;LOGGED at &quot;</span>. strftime(<span class="stringliteral">&quot;%Y-%m-%d %H:%M:%S&quot;</span>) .<span class="stringliteral">&quot;\n\n&quot;</span>;</div>
<div class="line">        $lines[]= $logMessage .<span class="stringliteral">&quot;\n&quot;</span>;</div>
<div class="line">        file_put_contents(<a class="code" href="config_8php_8template.html#a5f69b1d39894d1df9f8cb3f93a7dd018">ERROR_LOG</a>, $lines);</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a256dac2dddb669dcfbe514290889ff0c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">errorParse </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$errno</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$errstr</em> = <code>''</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$errfile</em> = <code>''</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$errline</em> = <code>''</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&amp;&#160;</td>
          <td class="paramname"><em>$logMessage</em> = <code>null</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="error_8php_source.html#l00035">35</a> of file <a class="el" href="error_8php_source.html">error.php</a>.</p>

<p>Referenced by <a class="el" href="error_8php_source.html#l00156">errorHandler()</a>.</p>
<div class="fragment"><div class="line">{</div>
<div class="line">        <span class="keywordflow">if</span> (is_object($errno))</div>
<div class="line">        {</div>
<div class="line">                  <span class="comment">// Called by exception.</span></div>
<div class="line">                  $exc = func_get_arg(0);</div>
<div class="line">                  $errno = $exc-&gt;getCode();</div>
<div class="line">                  $errstr = $exc-&gt;getMessage();</div>
<div class="line">                  $errfile = $exc-&gt;getFile();</div>
<div class="line">                  $errline = $exc-&gt;getLine();</div>
<div class="line">                  $backtrace = $exc-&gt;getTrace();</div>
<div class="line">        }</div>
<div class="line">        <span class="keywordflow">else</span></div>
<div class="line">        {</div>
<div class="line">                  <span class="comment">// Called by trigger_error().</span></div>
<div class="line">                  $exception = null;</div>
<div class="line">                  list($errno, $errstr, $errfile, $errline) = func_get_args();</div>
<div class="line">                  $backtrace = array_reverse(debug_backtrace());</div>
<div class="line">        }</div>
<div class="line"></div>
<div class="line">        $error_types = array</div>
<div class="line">        (</div>
<div class="line">                E_ERROR           =&gt; <span class="stringliteral">&#39;ERROR&#39;</span>,</div>
<div class="line">                E_WARNING         =&gt; <span class="stringliteral">&#39;WARNING&#39;</span>,</div>
<div class="line">                E_PARSE           =&gt; <span class="stringliteral">&#39;PARSING ERROR&#39;</span>,</div>
<div class="line">                E_NOTICE          =&gt; <span class="stringliteral">&#39;NOTICE&#39;</span>,</div>
<div class="line">                E_CORE_ERROR      =&gt; <span class="stringliteral">&#39;CORE ERROR&#39;</span>,</div>
<div class="line">                E_CORE_WARNING    =&gt; <span class="stringliteral">&#39;CORE WARNING&#39;</span>,</div>
<div class="line">                E_COMPILE_ERROR   =&gt; <span class="stringliteral">&#39;COMPILE ERROR&#39;</span>,</div>
<div class="line">                E_COMPILE_WARNING =&gt; <span class="stringliteral">&#39;COMPILE WARNING&#39;</span>,</div>
<div class="line">                E_USER_ERROR      =&gt; <span class="stringliteral">&#39;USER ERROR&#39;</span>,</div>
<div class="line">                E_USER_WARNING    =&gt; <span class="stringliteral">&#39;USER WARNING&#39;</span>,</div>
<div class="line">                E_USER_NOTICE     =&gt; <span class="stringliteral">&#39;USER NOTICE&#39;</span>,</div>
<div class="line">                E_STRICT          =&gt; <span class="stringliteral">&#39;STRICT NOTICE&#39;</span>,</div>
<div class="line">                E_RECOVERABLE_ERROR =&gt; <span class="stringliteral">&#39;RECOVERABLE ERROR&#39;</span>,</div>
<div class="line">        );</div>
<div class="line"></div>
<div class="line">        <span class="keywordflow">if</span> (array_key_exists($errno, $error_types))</div>
<div class="line">                $err = $error_types[$errno];</div>
<div class="line">        <span class="keywordflow">else</span></div>
<div class="line">                $err = <span class="stringliteral">&#39;CAUGHT EXCEPTION&#39;</span>;</div>
<div class="line"></div>
<div class="line">        $trace = <span class="stringliteral">&quot;plik $errfile linia $errline\n&quot;</span>;</div>
<div class="line">        <span class="keywordflow">foreach</span> ($backtrace as $v)</div>
<div class="line">        {</div>
<div class="line">                <span class="keywordflow">if</span> (isset($v[<span class="stringliteral">&#39;class&#39;</span>]))</div>
<div class="line">                {</div>
<div class="line">                        $trace .= <span class="stringliteral">&#39;in class &#39;</span>.$v[<span class="stringliteral">&#39;class&#39;</span>].<span class="stringliteral">&#39;::&#39;</span>.$v[<span class="stringliteral">&#39;function&#39;</span>].<span class="charliteral">&#39;(&#39;</span>;</div>
<div class="line">                        <span class="keywordflow">if</span> (isset($v[<span class="stringliteral">&#39;args&#39;</span>]))</div>
<div class="line">                        {</div>
<div class="line">                                $args = array();</div>
<div class="line">                                <span class="keywordflow">foreach</span> ($v[<span class="stringliteral">&#39;args&#39;</span>] as $arg )  $args[]= <a class="code" href="error_8php.html#ab1a82923ae40857687d61a5be27baa78">getArgument</a>($arg);</div>
<div class="line">                                $trace .= implode(<span class="stringliteral">&#39;, &#39;</span>,$args);</div>
<div class="line">                        }</div>
<div class="line">                        $trace .= <span class="stringliteral">&quot;)\n&quot;</span>;</div>
<div class="line">                        <span class="keywordflow">if</span> (isset($v[<span class="stringliteral">&#39;line&#39;</span>]))</div>
<div class="line">                                $trace .= <span class="stringliteral">&#39;     &#39;</span>. $v[<span class="stringliteral">&#39;file&#39;</span>] .<span class="stringliteral">&#39; #&#39;</span>. $v[<span class="stringliteral">&#39;line&#39;</span>] .<span class="stringliteral">&quot;\n&quot;</span>;</div>
<div class="line">                }</div>
<div class="line"></div>
<div class="line">                elseif (isset($v[<span class="stringliteral">&#39;function&#39;</span>]) <span class="comment">/*&amp;&amp; empty($trace)*/</span>)</div>
<div class="line">                {</div>
<div class="line">                        $trace .= <span class="stringliteral">&#39;in function &#39;</span>.$v[<span class="stringliteral">&#39;function&#39;</span>].<span class="charliteral">&#39;(&#39;</span>;</div>
<div class="line">                        <span class="keywordflow">if</span> (!empty($v[<span class="stringliteral">&#39;args&#39;</span>]))</div>
<div class="line">                        {</div>
<div class="line">                                $args = array();</div>
<div class="line">                                <span class="keywordflow">if</span> (!in_array($v[<span class="stringliteral">&#39;function&#39;</span>], array(<span class="stringliteral">&#39;errorHandler&#39;</span>,<span class="stringliteral">&#39;errorParser&#39;</span>,<span class="stringliteral">&#39;getArgument&#39;</span>)))</div>
<div class="line">                                        <span class="keywordflow">foreach</span> ($v[<span class="stringliteral">&#39;args&#39;</span>] as $arg )  $args[]= <a class="code" href="error_8php.html#ab1a82923ae40857687d61a5be27baa78">getArgument</a>($arg);</div>
<div class="line">                                $trace .= implode(<span class="stringliteral">&#39;, &#39;</span>,$args);</div>
<div class="line">                        }</div>
<div class="line">                        $trace .= <span class="stringliteral">&quot;)\n&quot;</span>;</div>
<div class="line">                        <span class="keywordflow">if</span> (isset($v[<span class="stringliteral">&#39;line&#39;</span>]))</div>
<div class="line">                                $trace .= <span class="stringliteral">&#39;     &#39;</span>. $v[<span class="stringliteral">&#39;file&#39;</span>] .<span class="stringliteral">&#39; #&#39;</span>. $v[<span class="stringliteral">&#39;line&#39;</span>] .<span class="stringliteral">&quot;\n&quot;</span>;</div>
<div class="line">                }</div>
<div class="line">         }</div>
<div class="line"></div>
<div class="line">        $server = <span class="stringliteral">&#39;&#39;</span>;</div>
<div class="line">        <span class="keywordflow">foreach</span> ($_SERVER as $name =&gt; $value)</div>
<div class="line">                $server .= json_encode($name) .<span class="stringliteral">&quot; :\t&quot;</span>. json_encode($value) .<span class="stringliteral">&quot;\n&quot;</span>;</div>
<div class="line"></div>
<div class="line">        <span class="keywordflow">if</span> (isset($logMessage))  $logMessage =</div>
<div class="line">        <span class="stringliteral">&quot;       ===WWW $err===</span></div>
<div class="line"><span class="stringliteral">                &#39;$errstr&#39;</span></div>
<div class="line"><span class="stringliteral">                zapytanie: {$_SERVER[&#39;REQUEST_URI&#39;]}</span></div>
<div class="line"><span class="stringliteral">                file $errfile #$errline</span></div>
<div class="line"><span class="stringliteral">                ===Backtrace====</span></div>
<div class="line"><span class="stringliteral">                $trace</span></div>
<div class="line"><span class="stringliteral">                &quot;</span>. strftime(<span class="stringliteral">&#39;%T&#39;</span>) .<span class="stringliteral">&quot;</span></div>
<div class="line"><span class="stringliteral">                ================</span></div>
<div class="line"><span class="stringliteral">                \$_GET: &quot;</span>. json_encode($_GET) .<span class="stringliteral">&quot;</span></div>
<div class="line"><span class="stringliteral">                \$_POST: &quot;</span>. json_encode($_POST) .<span class="stringliteral">&quot;</span></div>
<div class="line"><span class="stringliteral">                \$_SERVER: {\n&quot;</span>. $server .<span class="stringliteral">&quot;</span></div>
<div class="line"><span class="stringliteral">                }</span></div>
<div class="line"><span class="stringliteral">                \$_SESSION: &quot;</span>. json_encode($_SESSION) .<span class="stringliteral">&quot;</span></div>
<div class="line"><span class="stringliteral">                ================</span></div>
<div class="line"><span class="stringliteral">        &quot;</span>;</div>
<div class="line"></div>
<div class="line">        $errstr = nl2br($errstr);</div>
<div class="line">        $trace  = nl2br($trace);</div>
<div class="line"></div>
<div class="line">        $report =</div>
<div class="line">        <span class="stringliteral">&quot;&lt;div class=\&quot;errorReport\&quot;&gt;</span></div>
<div class="line"><span class="stringliteral">                &lt;h1 style=&#39;font-size: 140%; margin-bottom:0;&#39;&gt;&quot;</span>. _(<span class="stringliteral">&#39;Error&#39;</span>) .<span class="stringliteral">&quot;&lt;/h1&gt;</span></div>
<div class="line"><span class="stringliteral">                &lt;div&gt;&quot;</span>. _(<span class="stringliteral">&#39;Oops, we\&#39;re sorry, something exploded. Our team of kittens is working on the problem.&#39;</span>) .<span class="stringliteral">&quot;&lt;br/&gt;$errstr&lt;/div&gt;&lt;br /&gt;</span></div>
<div class="line"><span class="stringliteral">        &quot;</span>;</div>
<div class="line">        <span class="keywordflow">if</span> (DEBUG)  $report.=</div>
<div class="line">        <span class="stringliteral">&quot;</span></div>
<div class="line"><span class="stringliteral">                &lt;a onclick=\&quot;getElementById(&#39;errorDetails&#39;).style.display=&#39;block&#39;;\&quot; style=&#39;margin:10px; border: 1px solid #aaa&#39;&gt;Show details&lt;/a&gt;&lt;br /&gt;</span></div>
<div class="line"><span class="stringliteral">                &lt;div id=&#39;errorDetails&#39; style=&#39;margin:10px; padding:5px; border: 1px solid #aaa; line-height:150%; display:none&#39;&gt;</span></div>
<div class="line"><span class="stringliteral">                        &lt;b&gt;typ: &lt;/b&gt;$err&lt;br/&gt;</span></div>
<div class="line"><span class="stringliteral">                        &lt;b&gt;zapytanie: &lt;/b&gt; {$_SERVER[&#39;REQUEST_URI&#39;]} &lt;br /&gt;</span></div>
<div class="line"><span class="stringliteral">                        &lt;b&gt;backtrace:&lt;/b&gt; $trace&lt;br /&gt;</span></div>
<div class="line"><span class="stringliteral">                        &lt;b&gt;\$_GET: &lt;/b&gt;&quot;</span>. htmlentities(json_encode($_GET)) .<span class="stringliteral">&quot;&lt;br /&gt;</span></div>
<div class="line"><span class="stringliteral">                        &lt;b&gt;\$_POST: &lt;/b&gt;&quot;</span>. htmlentities(json_encode($_POST)) .<span class="stringliteral">&quot;&lt;br /&gt;</span></div>
<div class="line"><span class="stringliteral">                        &lt;b&gt;\$_SESSION: &lt;/b&gt;&quot;</span>. htmlentities(json_encode($_SESSION)) .<span class="stringliteral">&quot;&lt;br /&gt;</span></div>
<div class="line"><span class="stringliteral">                        &lt;b&gt;\$_SERVER: &lt;/b&gt;&quot;</span>. htmlentities(json_encode($_SERVER)) .<span class="stringliteral">&quot;&lt;br /&gt;</span></div>
<div class="line"><span class="stringliteral">                &lt;/div&gt;</span></div>
<div class="line"><span class="stringliteral">        &quot;</span>;</div>
<div class="line">        $report.= strftime(<span class="stringliteral">&#39;%T %s&#39;</span>) .<span class="stringliteral">&quot;&lt;br /&gt;&lt;/div&gt;&quot;</span>;</div>
<div class="line">        <span class="keywordflow">return</span> $report;</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ab1a82923ae40857687d61a5be27baa78"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">getArgument </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$arg</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="error_8php_source.html#l00207">207</a> of file <a class="el" href="error_8php_source.html">error.php</a>.</p>

<p>Referenced by <a class="el" href="error_8php_source.html#l00035">errorParse()</a>.</p>
<div class="fragment"><div class="line">{</div>
<div class="line">        <span class="keywordflow">switch</span> (strtolower(gettype($arg)))</div>
<div class="line">        {</div>
<div class="line">                <span class="keywordflow">case</span> <span class="stringliteral">&#39;string&#39;</span>:</div>
<div class="line">                        <span class="keywordflow">return</span>( <span class="charliteral">&#39;&quot;&#39;</span>.substr(htmlspecialchars(str_replace( array(<span class="stringliteral">&quot;\n&quot;</span>), array(<span class="stringliteral">&#39;&#39;</span>), $arg )),0,50).<span class="charliteral">&#39;&quot;&#39;</span> );</div>
<div class="line">                <span class="keywordflow">case</span> <span class="stringliteral">&#39;boolean&#39;</span>:</div>
<div class="line">                        <span class="keywordflow">return</span> (<span class="keywordtype">bool</span>)$arg;</div>
<div class="line">                <span class="keywordflow">case</span> <span class="stringliteral">&#39;object&#39;</span>:</div>
<div class="line">                        <span class="keywordflow">return</span> <span class="stringliteral">&#39;object(&#39;</span>.get_class($arg).<span class="charliteral">&#39;)&#39;</span>;</div>
<div class="line">                <span class="keywordflow">case</span> <span class="stringliteral">&#39;array&#39;</span>:</div>
<div class="line">                        $args = array();</div>
<div class="line">                        <span class="keywordflow">foreach</span> ($arg as $k =&gt; $v)  $args[]= <a class="code" href="error_8php.html#ab1a82923ae40857687d61a5be27baa78">getArgument</a>($k).<span class="stringliteral">&#39; =&gt; &#39;</span>.<a class="code" href="error_8php.html#ab1a82923ae40857687d61a5be27baa78">getArgument</a>($v);</div>
<div class="line">                        $ret = <span class="stringliteral">&#39;array(&#39;</span>.implode(<span class="stringliteral">&#39;, &#39;</span>,$args).<span class="charliteral">&#39;)&#39;</span>;</div>
<div class="line">                        <span class="keywordflow">return</span> $ret;</div>
<div class="line">                <span class="keywordflow">case</span> <span class="stringliteral">&#39;resource&#39;</span>:</div>
<div class="line">                        <span class="keywordflow">return</span> <span class="stringliteral">&#39;resource(&#39;</span>.get_resource_type($arg).<span class="charliteral">&#39;)&#39;</span>;</div>
<div class="line">                <span class="keywordflow">default</span>:</div>
<div class="line">                        <span class="keywordflow">return</span> var_export($arg, <span class="keyword">true</span>);</div>
<div class="line">         }</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="afbdc4b0d28a418a301f894606c50a7b9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">initErrors </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="error_8php_source.html#l00019">19</a> of file <a class="el" href="error_8php_source.html">error.php</a>.</p>
<div class="fragment"><div class="line">{</div>
<div class="line">        <span class="keywordflow">if</span> (isset($_GET[<span class="stringliteral">&#39;debug&#39;</span>]))  $_SESSION[<span class="stringliteral">&#39;debug&#39;</span>] = $_GET[<span class="stringliteral">&#39;debug&#39;</span>];</div>
<div class="line">        <span class="keywordflow">if</span> (isset($_SESSION[<span class="stringliteral">&#39;debug&#39;</span>]) &amp;&amp; $_SESSION[<span class="stringliteral">&#39;debug&#39;</span>]&gt;0)  define(<span class="stringliteral">&#39;DEBUG&#39;</span>, $_SESSION[<span class="stringliteral">&#39;debug&#39;</span>]);</div>
<div class="line">        <span class="keywordflow">else</span> define(<span class="stringliteral">&#39;DEBUG&#39;</span>, 0);</div>
<div class="line"></div>
<div class="line">        <span class="keywordflow">if</span> (DEBUG&gt;=1)  error_reporting(E_ALL | E_STRICT);</div>
<div class="line">        <span class="keywordflow">else</span>  error_reporting(E_ERROR | E_PARSE | E_CORE_ERROR | E_USER_ERROR);</div>
<div class="line">        ini_set(<span class="stringliteral">&quot;display_errors&quot;</span>, 1);</div>
<div class="line">        ini_set(<span class="stringliteral">&quot;display_startup_errors&quot;</span>, 1);</div>
<div class="line"></div>
<div class="line">        set_error_handler(<span class="stringliteral">&#39;errorHandler&#39;</span>);</div>
<div class="line">        set_exception_handler(<span class="stringliteral">&#39;errorHandler&#39;</span>);</div>
<div class="line">        register_shutdown_function(<span class="stringliteral">&#39;shutdownHandler&#39;</span>);</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="aecac67e056c30d19f4bb48d0593c24fb"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">shutdownHandler </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="error_8php_source.html#l00194">194</a> of file <a class="el" href="error_8php_source.html">error.php</a>.</p>
<div class="fragment"><div class="line">{</div>
<div class="line">        <span class="comment">// Check for fatal error on shutdown.</span></div>
<div class="line">        $error = error_get_last();</div>
<div class="line">        <span class="keywordflow">if</span> (is_array($error) &amp;&amp; in_array($error[<span class="stringliteral">&#39;type&#39;</span>], array(E_ERROR, E_CORE_ERROR, E_COMPILE_ERROR), <span class="keyword">true</span>))</div>
<div class="line">        {</div>
<div class="line">                $logMessage = <span class="stringliteral">&quot;FATAL ERROR\n&quot;</span>. $error[<span class="stringliteral">&#39;file&#39;</span>] .<span class="stringliteral">&#39; : &#39;</span>. $error[<span class="stringliteral">&#39;line&#39;</span>] .<span class="stringliteral">&quot;\n&quot;</span>;</div>
<div class="line">                $logMessage .= $error[<span class="stringliteral">&#39;message&#39;</span>];</div>
<div class="line">                <a class="code" href="error_8php.html#a1cc8adecfb295ae30b85d90dc5ca3062">errorLog</a>($logMessage);</div>
<div class="line">                <span class="keywordflow">if</span> (<a class="code" href="config_8php_8template.html#a5c3cdee20942e4753d2dcdb4a36085ef">ERROR_EMAIL</a>)  <a class="code" href="email_8php.html#a4d9b10638d7c2d561789ed42890fba01">sendMail</a>(<span class="stringliteral">&#39;warsztatyWWW fatal error&#39;</span>, $logMessage, <a class="code" href="config_8php_8template.html#ad44b83fd76c17d2ae868b79ce296e01d">ERROR_EMAIL_ADDRESS</a>);</div>
<div class="line">        }</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sun Sep 8 2013 17:44:57 for wwwApp by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.1.1
</small></address>
</body>
</html>
